<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html> 
<head>
<%@ include file="../../include/easyui.jsp" %>
<%@ include file="../../include/pGrid.jsp" %>
<title>固定资产</title>
<script>
	$(function(){
		var gridParam = {
			url: '/console/com.fs.jzzn.pojo.FixedAssets/list',
			sort: 'createTime',
			order: 'desc',
			columns:[[
		    	 {field: 'no', title: '资产编号', width: 130}
		         ,{field: 'type', title: '资产类别', width: 120}
		    	 ,{field: 'year', title: '年份', width: 80}
		    	 ,{field: 'name', title: '资产名称', width: 120}
		    	 ,{field: 'purchaseDate', title: '购进日期', width: 80}
		    	 ,{field: 'specifications', title: '规格型号', width: 120}
		    	 ,{field: 'metering', title: '计量单位', width: 60}
		    	 ,{field: 'count', title: '数量', width: 60}
		    	 ,{field: 'money', title: '原值(金额)', width: 80}
		    	 ,{field: 'present', title: '估计现值', width: 80}
		    	 ,{field: 'orgNoName', title: '使用部门', width: 100}
		    	 ,{field: 'people', title: '使用人', width: 80}
		    	 ,{field: 'assets', title: '资产状态', width: 80}
		    	 ,{field : 'createTime',title: '创建时间',width : 130}
				,{field : 'createrName',title: '创建人',width : 130}
			]]
		};
		p.dataGrid = $(p.dataGrid).datagrid($.extend({}, p.dataGridParam,gridParam));
		/*事件响应*/
		$("#toolbar .easyui-linkbutton").on("click", function() {
			var motion_code = $(this).attr("motion_code");p.btnOneClick($(this));
			switch (motion_code) {
				case "01":
					p.gridAdd({title : "固定资产新增" ,width : 880, height : 460 });
					break;
				case "02":
					p.gridModify({title : "固定资产编辑" ,width : 880, height : 460 });
					break;
				case "03":
					p.gridDelete({ msg:"您确认删除当前选中固定资产？" });
					break;
				case "04":
					p.gridView({title : "固定资产查看" ,width : 880, height : 460 });
					break;
				case "05":
					p.gridQuery();
					break;
				case "07":
					p.down({filename:'固定资产'});
					break;
				case "19":
					p.gridAdd({title:'固定资产导入',href:"/console/fixedAssets/rewrite/toImport",width : 550, height : 420 })
					break;
				default:
					break;
				}
		});
	});
</script>
</head>
<body class="easyui-layout">
	<!-- 单行高度33px，多行时 33乘以行数  -->
	<div data-options="region:'north',split:false,border:false" style="height:auto;">
		<div class="easyui-panel" data-options="fit:true,border:false">
			<form id="queryForm" >
				 <input type="hidden" name="className" value="com.fs.jzzn.pojo.FixedAssets" />
				 <div style="margin-top:5px;margin-left:10px;float:left;">
				  	<input class="easyui-textbox" name="type" style="width:240px;" data-options="label:'资产类别:',required:false" />
					<input type="hidden" name="type_searchType" value="like" />
				 </div>
				 <div class="fItem">
				  	<select class="easyui-combobox  easyui-validatebox" name="year" style="width:240px;" data-options="label:'年份:'" >
					  	<option value="">==不限==</option>
					  	<option value="2010">2010</option>
					  	<option value="2011">2011</option>
					  	<option value="2012">2012</option>
					  	<option value="2013">2013</option>
					  	<option value="2014">2014</option>
					  	<option value="2015">2015</option>
					  	<option value="2016">2016</option>
					  	<option value="2017">2017</option>
					  	<option value="2018">2018</option>
					  	<option value="2019">2019</option>
					  	<option value="2020">2020</option>
					  	<option value="未知">未知</option>
					  </select>
					<input type="hidden" name="year_searchType" value="like" />
				 </div>
				 <div class="fItem">
				  	<input class="easyui-textbox" name="no" style="width:240px;" data-options="label:'资产编号:',required:false" />
					<input type="hidden" name="no_searchType" value="like" />
				 </div>
				  <div class="fItem">
				  	<input class="easyui-textbox" name="name" style="width:240px;" data-options="label:'资产名称:',required:false" />
					<input type="hidden" name="name_searchType" value="like" />
				 </div>
				 
				 <div class="fItem">
				 	<input type="hidden" name="orgNo_searchType" value="like" />
				 	<select class="easyui-combotreegrid" id="orgNo_tree" name="orgNo" style="width:240px;" data-options="label:'使用部门:',panelWidth:300,
			           	prompt:'请选择使用部门',
			           	idField: 'orgNo', 
						treeField: 'orgName',
						sortName:'orgOrder',
						icons: [{
							iconCls:'icon-remove',
							handler: function(e){
								$(e.data.target).textbox('setValue', '');
							}
						}],
						iconAlign:'right',
						textField:'orgName',
						onSelect:function(row){
							$('#orgNo_tree').combogrid('setText', row.orgName);
						},
						sortOrder:'asc',
			            url:'/console/com.fs.base.pojo.Org/list', 
			            queryParams:{isTreeGrid:'true', treeId:'id', treePid:'parentId' },
			            columns:[[    
			                {field:'orgName',			width:250,	title:'组织名称' }
			            ]]"></select>
				 </div>
				 
				 <div class="fItem">
			  		<input class="easyui-combobox" name="people" style="width:240px;" url="/console/combobox?valueField=nickName&textField=nickName&modleName=user" data-options="label:'使用人:',required:false" />
			  		<input type="hidden" name="people_searchType" value="like" />
			 	</div>
			 	
			 	<div class="fItem">
			 		<select class="easyui-combobox" name="assets" style="width:240px;" data-options="label:'资产状态:',prompt:'资产状态' " 
						url="/console/combobox?valueField=dicName&textField=dicName&modleName=dictionary&pCode=D1&pCode_searchType=eq" >
				    </select>
			  		<input type="hidden" name="assets_searchType" value="like" />
			 	</div>
			</form>
		</div>
	</div>
	<!-- 工具栏按钮 -->
	<div id="toolbar" class="easyui-panel" style="padding:3px;">
	</div>
	
	<!-- 表格 -->
	<div region="center" border="false">
		<table id="dataGrid"></table>
	</div>
</body>
</html>